<?php

namespace app\admin\validate;

use think\Validate;

class Information extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'user_id' => 'require',
        'title' => 'require',
        'content' => 'require',
        'images' => 'require'
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '请填写ID',
        'user_id.require' => '请填写创建人',
        'title.require' => '请填写标题',
        'content.require' => '请填写内容',
        'images.require' => '请填写图片',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['title', 'user_id', 'title', 'content', 'images'],
        'edit' => ['id', 'title', 'content', 'images'],
        'delete' => ['id'],
    ];
    
}
